package com.example.vote.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.vote.bean.User;
import com.example.vote.mapper.UserDao;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserDao, User> {


    public User login(String phone, String name) {
        User user = lambdaQuery()
                .eq(User::getPhone, phone)
                .eq(User::getName, name)
                .one();
        return user;
    }
}
